package io.kimmking.rpcfx.demo.consumer;

import io.kimmking.rpcfx.client.Rpcfx;
import io.kimmking.rpcfx.demo.api.UserService;
import io.kimmking.rpcfx.proxy.RpcfxCglib;

/**
 * @author lfy
 */
public class PressureTest {
    public static void main(String[] args) {

        UserService userService = Rpcfx.create(UserService.class, "http://localhost:8080/");
        userService.findById(1);
        int count = 0;
        long testTime = 10000;
        long last = System.currentTimeMillis()+testTime;
        while (System.currentTimeMillis() < last){
            userService.findById(1);
            count++;
        }
        System.out.println(testTime+"ms执行了:"+count+"次");
    }
}
